DECLARE SUB Stats ()
DECLARE SUB TalkBum ()
DECLARE SUB BloodBank ()
DECLARE SUB CannotGo ()
DECLARE SUB Alley1 ()
DECLARE SUB CannotDo ()
DECLARE SUB Help ()
DECLARE SUB Inventory ()
DECLARE SUB Quit ()
DECLARE SUB RestoreInGame ()
DECLARE SUB SaveGame ()
'$INCLUDE: 'c:\bc7\programs\cyber\global.bi'

SUB Alley3

RestoreRoom = 4
Room:
  CLS
  PRINT "The alley stops here, terminating against a large red-brick building.  A bum"
  PRINT "is laying here, clutching a bottle in a paper sack.  The building has a large"
  PRINT "glass front and has a stenciled sign that reads 'Blood Bank.'"
Command:
  LINE INPUT "> "; a$: a$ = UCASE$(a$)
  IF a$ = "N" OR a$ = "NORTH" OR a$ = "GO NORTH" THEN CannotGo: GOTO Command
  IF a$ = "S" OR a$ = "SOUTH" OR a$ = "GO SOUTH" THEN CannotGo: GOTO Command
  IF a$ = "E" OR a$ = "EAST" OR a$ = "GO EAST" THEN Alley1
  IF a$ = "W" OR a$ = "WEST" OR a$ = "GO WEST" THEN BloodBank
  IF a$ = "STATS" THEN Stats: GOTO Command
  IF a$ = "SEARCH" OR a$ = "SEARCH ROOM" THEN GOTO SearchRoom: GOTO Command
  IF a$ = "LOOK" THEN GOTO Room: GOTO Command
  IF a$ = "HELP" OR a$ = "?" THEN Help: GOTO Room
  IF a$ = "QUIT" OR a$ = "EXIT" THEN Quit: GOTO Command
  IF a$ = "I" OR a$ = "INVENTORY" THEN Inventory: GOTO Command
  IF a$ = "SAVE" OR a$ = "SAVE GAME" THEN SaveGame: GOTO Command
  IF a$ = "RESTORE" OR a$ = "RESTORE GAME" THEN RestoreInGame: GOTO Command
  IF a$ = "GET BOTTLE" OR a$ = "GET SACK" OR a$ = "TAKE BOTTLE" OR a$ = "TAKE SACK" THEN PRINT "The bum clutches the bottle tighter and grunts at you.": GOTO Command
  IF a$ = "TALK BUM" OR a$ = "TALK MAN" THEN TalkBum: GOTO Room
  CannotDo
  GOTO Command

SearchRoom:
  PRINT "You find nothing of interest."
  GOTO Command

END SUB

SUB TalkBum
  CLS
  PRINT "The old bum looks up at you with bleary eyes and takes a swig from his"
  PRINT "bottle.  He then belches loudly."
  COLOR 15, 0, 9: PRINT "What'd ya want?"
Talk:
  COLOR 7, 0, 8: LINE INPUT "? "; a$: a$ = UCASE$(a$)
  COLOR 15, 0, 9
  IF a$ = "NAME" THEN PRINT "Eh?  Name's John.": GOTO Talk
  IF a$ = "JOB" OR a$ = "BUM" THEN PRINT "Heh heh.  Wha'da ya think?": GOTO Talk
  IF a$ = "BAG" OR a$ = "BOTTLE" OR a$ = "SACK" THEN PRINT "Mine!": GOTO Talk
  IF a$ = "HOME" THEN PRINT "Haven't got one.": GOTO Talk
  IF a$ = "BURP" OR a$ = "BELCH" THEN PRINT "You're not so bad.": GOTO Talk
  IF a$ = "BYE" OR a$ = "GOODBYE" THEN GOTO EndConversation
  b = INT((3) * RND)
  IF b = 0 THEN PRINT "Belch."
  IF b = 1 THEN PRINT "Huh?"
  IF b = 2 THEN PRINT "Leave me alone."
  GOTO Talk

EndConversation:
  COLOR 7, 0, 8
END SUB

